<cfsetting enablecfoutputonly="true">
<cfswitch expression="#thisTag.executionMode#">
	<cfcase value="start">
		<cfparam name="attributes.id" default="">
		<cfparam name="attributes.value" default="">
		<cfparam name="attributes.name" default="">
		<cfparam name="attributes.fieldParam" default="true">
		<cfif StructKeyExists(caller,'root')>
				<cfset root = caller.root>
		<cfelse>
			<cfset root = caller>
		</cfif>
		<cfif NOT thisTag.hasEndTag>
			<cfthrow detail="End tag required" message="All coop tags require an end tag." errorcode="sos.tag.attributes">
		</cfif>
		<cfif attributes.id EQ ''>
			<cfthrow detail="Missing required attribute: 'id'" message="'id' attribute is required">
		</cfif>
		<cfif NOT structKeyExists(root,"coop")>
			<cfthrow detail="Missing required COOP object on calling page.">
		</cfif>
		<cfscript>
		standardAttributes = 'id,value,name,fieldParam';
		attributes = root.coop.mergeAttributes(attributes,root);
		attributeList = root.coop.createAttributeList(attributes,standardAttributes,root);
		if (attributes.name EQ '') {
			attributes.name = attributes.id;
		}
		if (attributes.fieldParam) {
			attributes.value = root.coop.fieldParam(root._init.attributes,attributes.name,attributes.value);
		}
		</cfscript>
	</cfcase>
	<cfcase value="end">
		<cfif attributes.value EQ ''>
			<cfif attributes.value EQ '' AND thisTag.generatedContent EQ ''>
				<cfset attributes.value = 'Reset'>
			<cfelseif attributes.value EQ ''>
				<cfset attributes.value = thisTag.generatedContent>
			</cfif>
		</cfif>
		<cfsavecontent variable="formElement"><cfoutput><input type="reset" value="#attributes.value#" id="#attributes.id#"#attributeList#></cfoutput></cfsavecontent>
		<cfoutput>#formElement#</cfoutput>
		<cfset thisTag.generatedContent = ''>
	</cfcase>
</cfswitch>
<cfsetting enablecfoutputonly="false">